using System;
using System.Configuration;
using System.Diagnostics;


namespace Ajax.Logging
{
    /*
    <configuration >
        <configSections>
            <section
                name="ajaxExceptionLogSetting"
                type="Ajax.Logging.ExceptionLogProviderSettings, Ajax.Logging, Version=1.0.0.0, Culture=neutral"
            />
        </configSections>
        <ajaxExceptionLogSetting defaultProvider="WebEvent">
            <providers>
                <add
                    name="WebEvent"
                    type="Ajax.Logging.WebEventLogProvider, Ajax.Logging, Version=1.0.0.0, Culture=neutral"
                />
            </providers>
        </ajaxExceptionLogSetting>
    </configuration>
    */
    public class ExceptionLogProviderSettings : ConfigurationSection
    {
        internal const string SectionName = "ajaxExceptionLogSetting";

        [ConfigurationProperty("providers")]
        public ProviderSettingsCollection Providers
        {
            [DebuggerStepThrough()]
            get
            {
                return (ProviderSettingsCollection)base["providers"];
            }
        }

        [StringValidator(MinLength = 1)]
        [ConfigurationProperty("defaultProvider", DefaultValue = "WebEvent")]
        public string DefaultProvider
        {
            [DebuggerStepThrough()]
            get
            {
                return (string)base["defaultProvider"];
            }
            [DebuggerStepThrough()]
            set
            {
                base["defaultProvider"] = value;
            }
        }
    }
}